package compiler;

import compiler.exceptions.HowlParserException;

/**
 * 
 * @author Sarah Mount <s.mount@wlv.ac.uk>
 * @version 16 Dec 2009
 * 
 */
public abstract class HowlToken {

	protected TokenReader tokenReader;

	public HowlToken(TokenReader tokenReader) {
		this.tokenReader = tokenReader;
	}

	/**
	 * Evaluate a HowlToken and return a GQL query as a String.
	 * 
	 * @return GQL query that implements this Howl statement.
	 */
	public abstract String codeGenerate();

	/**
	 * Parse a Howl statement and return a HowlToken.
	 * 
	 * @return token object constructed from a Howl program.
	 * @throws HowlParserException
	 */
	public abstract HowlToken parse() throws HowlParserException;

}